<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>旅行 - Powered By ${systemConfig.systemName}</title>
<meta name="Author" content="webmall Team" />
<meta name="Copyright" content="webmall" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<#include "/WEB-INF/template/common/include.ftl">
<link href="${base}/template/shop/css/login.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/register.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/webmall/css/trip.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/template/shop/js/login.js"></script>
<script type="text/javascript" src="${base}/template/shop/js/register.js"></script>
<script type="text/javascript" src="${base}/template/shop/js/product.js"></script>

<script type="text/javascript">
$().ready( function() {
	
	$('div.cycle_parent div.cycle').each(function(i){
		$('#'+this.id).cycle({ 
				fx:'scrollLeft',
				pager:'#'+this.id+'_btn'
		});
	 });
	 
	$(".trip .option .tripTypeClass input[type='radio']").click( function() {
			if(this.value=='s')
			{
				$("#endDataParent").hide();
				$("input[name='toFlight.departureDate']").attr("disabled",true);
			}
			else
			{
				$("input[name='toFlight.departureDate']").removeAttr("disabled");
				$("#endDataParent").show();
			}
	});
	
})

</script>
</head>

<body class="trip">
<#assign checkedMenuId='402881882ba98cce012ba9d5cd0f0019'/>
	<#include "/WEB-INF/template/shop/tripheader.ftl">
	<div class="body">
		<div class="bodyLeftSmall">
			<div class="option">
			<form class="validationForm" action="${base}/shop/trip!showfare.action" method="post">
				<div class="title font_white">机票</div>		
				<div class="item tripTypeClass">
						<input type="radio" name="tickeType" value="s" <#if (tickeType=='s')>checked</#if>  />&nbsp;单程
						<input type="radio" name="tickeType" value="m" <#if (tickeType=='m')>checked</#if>  />&nbsp;往返
				</div>
				<div class="item">
					<div class="lable">
					出发城市:
					</div>
					<div class="elements">
						
							<input id="from_cityName" name="fromCityName" value="${fromCityName}"  relatedId="fromCityCode" class="changeRelated" type="text" />
							<input id="fromCityCode" name="fromFlight.fromCity"  value="${fromFlight.fromCity}" type="hidden" />
						
					</div>
				</div>
				<div class="item">
					<div class="lable">
					到达城市:
					</div>
					<div class="elements">
							<input id="to_cityName" name="toCityName" value="${toCityName}"  relatedId="toCityCode" class="changeRelated" type="text" />
							<input id="toCityCode" name="fromFlight.arriveCity" value="${fromFlight.arriveCity}" type="hidden" />
					</div>
				</div>
				<div class="item">
					<div class="lable">
						出发日期:
					</div>
					<div class="elements">
						<input name="fromFlight.departureDate" value="${fromFlight.departureDate}" type="text" id="departureDate" onFocus="WdatePicker({doubleCalendar:true,minDate:'%y-%M-{%d+0}',maxDate:'#F{$dp.$D(\'boardData\',{d:0});}'})" />
					</div>
				</div>
				<div class="item<#if (tickeType=='s')> hide</#if>" id="endDataParent">
					<div class="lable">
						返程日期:
					</div>
					<div class="elements">
						<input name="toFlight.departureDate" <#if (tickeType=='s')> disabled </#if> value="${(toFlight.departureDate)!''}"  value="${(toFlight.departureDate)!}" type="text" id="boardData" onFocus="WdatePicker({doubleCalendar:true,minDate:'#F{$dp.$D(\'departureDate\',{d:0});}'})" />
					</div>
				</div>
				<div class="item">
					<div class="lable">
						首选舱位:
					</div>
					<div class="elements">
						<select name="cabinClass">
							<option value="Y" <#if (cabinClass=='Y')>selected</#if>>经济舱</option>
							<option value="C" <#if (cabinClass=='C')>selected</#if>>商务舱</option>
							<option value="F" <#if (cabinClass=='F')>selected</#if>>头等舱</option>
						</select>
					</div>
				</div>
				<div class="item">
					<input class="btn_blue tripQuery font_white" type="submit" value="机票查询" />
				</div>
			</form>
			</div>
			<div class="blank"></div>
			<div class="tools">
				<div class="title">航空工具箱</div>
				<div class="content">
				</div>
			</div>
		</div>
		<div class="bodyRightSmall">
			
			<div class="nav">
				<div class="flight">
					机票 &nbsp;&nbsp;${fromCityName}-${toCityName}
					<#if (tickeType=='s')>
						（单程）
					<#else>
						（往返）
					</#if>
				</div>
				<div class="flow">
				<!--
				one
					<div class="trip_nav_first_two">去程</div>
					<div class="trip_nav_middle_one">回程</div>
					two
					<div class="trip_nav_first_three">去程</div>
					<div class="trip_nav_middle_two">回程</div>
					
					middle
					<div class="trip_nav_first_one">去程</div>
					<div class="trip_nav_middle_three">回程</div>
					
					-->
					<div class="trip_nav_first_two">去程</div>
					<#if (tickeType=='m')>
						<div class="trip_nav_middle_one">回程</div>
					</#if>
					<div class="trip_nav_middle_one">填写</div>
					<div class="trip_nav_middle_one">支付</div>
					<div class="trip_nav_last_one">完成</div>
				</div>
			</div>
			<div class="blank"></div>
			<div class="week">
				<div class="week_head">
					<div class="week_day">星期一</div>
					<div class="week_day">星期二</div>
					<div class="week_day">星期三</div>
					<div class="week_day">星期四</div>
					<div class="week_day">星期五</div>
					<div class="week_day">星期六</div>
					<div class="week_day">星期日</div>
				</div>
				<div class="week_content">
					<#list 0..6 as t>
						<#if (t+1 < Request["startId"]) >
						<div class="week_item"></div>
						</#if>
					</#list>
					<#list res.body.specTicket as ticket>
						<div class="week_item">
							${ticket.getFormatDate()}
							<br/>
							<span class="specPrice">
								￥${ticket.getPrice()}
							</span>
						</div>
					</#list>
					<#list 5..0 as t>
						<#if (t+1 >= Request["startId"]) >
						<div class="week_item"></div>
						</#if>
					</#list>
				</div>
			</div>
			<div class="blank"></div>
			<div class="">
				 &nbsp;&nbsp;${fromCityName}-${toCityName} 去程日期:${fromFlight.departureDate} 
				<#if (tickeType=='s')>
					单程
				<#else>
					往返
				</#if>
				
			</div>
			<div class="blank"></div>
			<div class="lines">
				<div class="content">
				
					<div class="title">
						<div class="column" style="width:140px;">
							航空公司
						</div>
						<div class="column" style="width:60px;">
							起抵时间
						</div>
						<div class="column" style="width:140px;">
							起抵机场
						</div>
						<div class="column" style="width:60px;">
							机型
						</div>
						<div class="column" style="width:80px;">
							机建/燃油
						</div>
						<div class="column" style="width:140px;">
							价格
						</div>
						<div class="column" style="width:70px;">
							操作
						</div>
						<div class="column" style="width:60px;">
							备注
						</div>
					</div>
					
					<#list res.body.llist.line as line>
						<#if (tickeType=='m')>
							<form action="${base}/shop/trip!showback.action" method="post">
							<input type="hidden" name="toFlight.departureDate" value="${(toFlight.departureDate)!''}" />
							<input type="hidden" name="toFlight.fromCity" value="${fromFlight.arriveCity}" />
							<input type="hidden" name="toFlight.arriveCity" value="${fromFlight.fromCity}" />
							<input type="hidden" name="toFlight.carrier" value="${fromFlight.carrier}" />
							
						<#else>
							<form action="${base}/shop/trip!subinfo.action" method="post">
						</#if>
						
							<input type="hidden" name="tickeType" value="${tickeType}" />
							<input type="hidden" name="fromCityName" value="${fromCityName}" />
							<input type="hidden" name="toCityName" value="${toCityName}" />
							<input type="hidden" name="cabinClass" value="${cabinClass}" />
							<input type="hidden" name="carrier" value="${carrier}" />
							
							
							<input type="hidden" name="fromFlight.flightNo" value="${line.getFNo()}" />
							<input type="hidden" name="fromFlight.fromCity" value="${fromFlight.fromCity}" />
							<input type="hidden" name="fromFlight.arriveCity" value="${fromFlight.arriveCity}" />
							<input type="hidden" name="fromFlight.mileage" value="${line.mileage}" />
							<input type="hidden" name="fromFlight.classCode" value="${line.classCode}" />
							<input type="hidden" name="fromFlight.yPrice" value="${line.yPrice}" />
							<input type="hidden" name="fromFlight.classPrice" value="${line.getPList().getPosition().get(0).getSysPrice()}" />
							<input type="hidden" name="fromFlight.fuelSurTax" value="${line.aot}" />
							<input type="hidden" name="fromFlight.airportTax" value="${line.apt}" />
							<input type="hidden" name="fromFlight.departureDate" value="${line.getFDate()}" />
							<input type="hidden" name="fromFlight.departureTime" value="${line.getFTime()}" />
							<input type="hidden" name="fromFlight.arrivalDate" value="${line.getADate()}" />
							<input type="hidden" name="fromFlight.arrivalTime" value="${line.getATime()}" />
							<input type="hidden" name="fromFlight.aircraft" value="${line.craft}" />
							<input type="hidden" name="fromFlight.companyName" value="${line.companyName}" />
							<input type="hidden" name="fromFlight.fromAirPortName" value="${line.fromAirPortName}" />
							<input type="hidden" name="fromFlight.arrivalAirPortName" value="${line.arrivalAirPortName}" />
							
							<div class="line">
								<div class="column" style="width:140px;">
									<img src="${base}/template/webmall/images/trip/zghk.png" style="float:left;margin-left:8px;" />
									<span style="float:left;">
										${line.companyName}
										<br/>
										${line.getFNo()} 
									</span>
								</div>
								<div class="column" style="width:60px;">
									<span>
										${line.getFTime()}
										<br/>
										${line.getATime()} 
									</span>
								</div>
								
								<div class="column" style="width:140px;">
									<span>
										${line.fromAirPortName}
										<br/>
										${line.arrivalAirPortName} 
									</span>
								</div>
								
								<div class="column" style="width:60px;">
									<span>
										${line.craft} 
									</span>
								</div>
								
								<div class="column" style="width:80px;">
									<span>
										${line.apt}
										/
										${line.aot} 
									</span>
								</div>
								
								<div class="column" style="width:140px;">
									<span class="specPrice">
										￥${line.getPList().getPosition().get(0).getSysPrice()}
									</span>
									(${line.getPList().getPosition().get(0).getRebate()})
									${line.getPList().getPosition().get(0).getRoom()}
									<br/>
									<a href="#" class="specPrice" onclick="$('#position_${line_index}').toggle();$('#tip_${line_index}').toggle();return false;">查看所有价格</a>
								</div>
								
								<div class="column" style="width:70px;">
											<input type="submit" value="去程预订" />
								</div>
								
								<div class="column" style="width:60px;">
											退改签
								</div>
							</div>
						</form>
					<div id="tip_${line_index}" class="position_tip" style="display:none;"></div>
					<div id="position_${line_index}" class="position_contain" style="display:none;">
						<#list line.getPList().getPosition() as position>
							<#if (tickeType=='m')>
								<form action="${base}/shop/trip!showback.action" method="post">
								<input type="hidden" name="toFlight.departureDate" value="${(toFlight.departureDate)!''}" />
								<input type="hidden" name="toFlight.fromCity" value="${fromFlight.arriveCity}" />
								<input type="hidden" name="toFlight.arriveCity" value="${fromFlight.fromCity}" />
								<input type="hidden" name="toFlight.carrier" value="${fromFlight.carrier}" />
								
							<#else>
								<form action="${base}/shop/trip!subinfo.action" method="post">
							</#if>
						
								<input type="hidden" name="tickeType" value="${tickeType}" />
								<input type="hidden" name="fromCityName" value="${fromCityName}" />
								<input type="hidden" name="toCityName" value="${toCityName}" />
								<input type="hidden" name="cabinClass" value="${cabinClass}" />
								<input type="hidden" name="carrier" value="${carrier}" />
								
								
								<input type="hidden" name="fromFlight.flightNo" value="${line.getFNo()}" />
								<input type="hidden" name="fromFlight.fromCity" value="${fromFlight.fromCity}" />
								<input type="hidden" name="fromFlight.arriveCity" value="${fromFlight.arriveCity}" />
								<input type="hidden" name="fromFlight.mileage" value="${line.mileage}" />
								<input type="hidden" name="fromFlight.classCode" value="${line.classCode}" />
								<input type="hidden" name="fromFlight.yPrice" value="${line.yPrice}" />
								<input type="hidden" name="fromFlight.classPrice" value="${position.getSysPrice()}" />
								<input type="hidden" name="fromFlight.fuelSurTax" value="${line.aot}" />
								<input type="hidden" name="fromFlight.airportTax" value="${line.apt}" />
								<input type="hidden" name="fromFlight.departureDate" value="${line.getFDate()}" />
								<input type="hidden" name="fromFlight.departureTime" value="${line.getFTime()}" />
								<input type="hidden" name="fromFlight.arrivalDate" value="${line.getADate()}" />
								<input type="hidden" name="fromFlight.arrivalTime" value="${line.getATime()}" />
								<input type="hidden" name="fromFlight.aircraft" value="${line.craft}" />
								<input type="hidden" name="fromFlight.companyName" value="${line.companyName}" />
								<input type="hidden" name="fromFlight.fromAirPortName" value="${line.fromAirPortName}" />
								<input type="hidden" name="fromFlight.arrivalAirPortName" value="${line.arrivalAirPortName}" />
								
								<div class="position" >
									<div class="column" style="width:140px;">
									</div>
									<div class="column" style="width:60px;">
									</div>
									
									<div class="column" style="width:140px;">
									</div>
									
									<div class="column" style="width:60px;">
									</div>
									
									<div class="column" style="width:80px;">
										<span>
											${line.apt}
											/
											${line.aot} 
										</span>
									</div>
									
									<div class="column" style="width:140px;">
										<span class="specPrice">
											￥${position.getSysPrice()}
										</span>
										(${position.getRebate()})
										${position.getRoom()}
									</div>
									
									<div class="column" style="width:70px;">
												<input type="submit" value="去程预订" />
									</div>
									
									<div class="column" style="width:60px;">
												退改签
									</div>
								</div>
							</form>
						</#list>
					</div>
					</#list>
					
				</div>
			</div>
			
			<div class="blank"></div>
			<div class="blockDiv">
				<div class="content" style="height:60px;line-height:60px;text-align:center;">
					<input class="btn_blue" type="button" style="border:none;margin:auto;" onclick="history.back(-1);" value="上一步" />
				</div>
			</div>
			<div class="blank"></div>
			
		</div>
	</div>
	<div class="blank"></div>
	<#include "/WEB-INF/template/shop/footer.ftl">
</body>
</html>
